package com.ruoyi.electricity.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.electricity.mapper.PersonHealthInfoMapper;
import com.ruoyi.electricity.domain.PersonHealthInfo;
import com.ruoyi.electricity.service.IPersonHealthInfoService;

/**
 * 健康信息检测Service业务层处理
 *
 * @author ljw
 * @date 2023-12-10
 */
@Service
public class PersonHealthInfoServiceImpl implements IPersonHealthInfoService
{
    @Autowired
    private PersonHealthInfoMapper personHealthInfoMapper;

    /**
     * 查询健康信息检测
     *
     * @param personId 健康信息检测主键
     * @return 健康信息检测
     */
    @Override
    public PersonHealthInfo selectPersonHealthInfoByPersonId(Integer personId)
    {
        return personHealthInfoMapper.selectPersonHealthInfoByPersonId(personId);
    }

    /**
     * 查询健康信息检测列表
     *
     * @param personHealthInfo 健康信息检测
     * @return 健康信息检测
     */
    @Override
    public List<PersonHealthInfo> selectPersonHealthInfoList(PersonHealthInfo personHealthInfo)
    {
        return personHealthInfoMapper.selectPersonHealthInfoList(personHealthInfo);
    }

    /**
     * 新增健康信息检测
     *
     * @param personHealthInfo 健康信息检测
     * @return 结果
     */
    @Override
    public int insertPersonHealthInfo(PersonHealthInfo personHealthInfo)
    {
        return personHealthInfoMapper.insertPersonHealthInfo(personHealthInfo);
    }

    /**
     * 修改健康信息检测
     *
     * @param personHealthInfo 健康信息检测
     * @return 结果
     */
    @Override
    public int updatePersonHealthInfo(PersonHealthInfo personHealthInfo)
    {
        return personHealthInfoMapper.updatePersonHealthInfo(personHealthInfo);
    }

    /**
     * 批量删除健康信息检测
     *
     * @param personIds 需要删除的健康信息检测主键
     * @return 结果
     */
    @Override
    public int deletePersonHealthInfoByPersonIds(Integer[] personIds)
    {
        return personHealthInfoMapper.deletePersonHealthInfoByPersonIds(personIds);
    }

    /**
     * 删除健康信息检测信息
     *
     * @param personId 健康信息检测主键
     * @return 结果
     */
    @Override
    public int deletePersonHealthInfoByPersonId(Integer personId)
    {
        return personHealthInfoMapper.deletePersonHealthInfoByPersonId(personId);
    }
}
